package cn.kgc.springcloud.config.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.ScopedProxyMode;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: mosin
 * @version: v1.0  2022/8/25
 */
@RestController
@RequestMapping("config")
@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)  // 实现数据的自动刷新
public class ConfigClientController {

    @Value("${name}")
    private  String name;
    @RequestMapping("t1")
    public String test1(){
        return "ConfigClientController ok name:"+name;
    }
}
